package cn.yuanqiao.archive.supervision.mapper;

import cn.yuanqiao.archive.appManager.domain.DataScopeBase;
import cn.yuanqiao.archive.supervision.domain.Supervision;
import cn.yuanqiao.common.annotation.DataScope;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 督察指导主表Mapper接口
 * 
 * @author xy
 * @date 2023-08-01
 */
@Mapper
public interface SupervisionMapper 
{
    /**
     * 查询督察指导主表
     * 
     * @param id 督察指导主表主键
     * @return 督察指导主表
     */
    public Supervision selectSupervisionById(@Param("id") Long id, @Param("tableName")String tableName);

    /**
     * 查询督察指导主表列表
     * 
     * @param supervision 督察指导主表
     * @return 督察指导主表集合
     */
    @DataScope(deptAlias = "d", userAlias = "a",deptColumn = "DEPT_ID",userColumn = "CREATEID")
    public List<Supervision> selectSupervisionList(@Param("dataScopeBase") DataScopeBase dataScopeBase, @Param("supervision") Supervision supervision);

    /**
     * 新增督察指导主表
     * 
     * @param supervision 督察指导主表
     * @return 结果
     */
    public int insertSupervision(Supervision supervision);

    /**
     * 修改督察指导主表
     * 
     * @param supervision 督察指导主表
     * @return 结果
     */
    public int updateSupervision(Supervision supervision);

    /**
     * 删除督察指导主表
     * 
     * @param id 督察指导主表主键
     * @return 结果
     */
    public int deleteSupervisionById(Long id);

    /**
     * 批量删除督察指导主表
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteSupervisionByIds(Long[] ids);
}
